package com.aqgj.Resource.bean;

import com.aqgj.util.BaseEntity;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;

@Entity
@Table(name = "resource")
public class Resource implements BaseEntity {

    private String id;//ä¸»é”®

    private String name;//èµ„æº�å��ç§°

    private String url;//èµ„æº�è·¯å¾„
    private String urlName;//èµ„æº�è·¯å¾„

    private String icon;//èµ„æº�å›¾æ ‡

    private Integer sort;//èµ„æº�å›¾æ ‡

    private String pid;//çˆ¶çº§èµ„æº�id


    private Integer status;//çŠ¶æ€�

    private Integer resourceType;//èµ„æº�ç±»åˆ«

    private java.util.Date createTime;//åˆ›å»ºæ—¶é—´

    private List<Resource> resourceList = new ArrayList<>();

    public void setId(String value){
        this.id = value;
    }
    public void setName(String value){
        this.name = value;
    }
    public void setUrl(String value){
        this.url = value;
    }
    public void setUrlName(String value){
        this.urlName = value;
    }
    public void setIcon(String value){
        this.icon = value;
    }
    public void setPid(String value){
        this.pid = value;
    }
    public void setStatus(Integer value){
        this.status = value;
    }
    public void setResourceType(Integer value){
        this.resourceType = value;
    }
    public void setCreateTime(java.util.Date value){
        this.createTime = value;
    }
    public void setSort(Integer sort) {  this.sort = sort; }

    @Id
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    @Column(name ="id",unique=true,nullable=false,insertable=true,updatable=true,length=32)
    public String getId(){
        return this.id;
    }
    @Column(name ="name",unique=false,nullable=false,insertable=true,updatable=true,length=64)
    public String getName(){
        return this.name;
    }
    @Column(name ="url",unique=false,nullable=true,insertable=true,updatable=true,length=100)
    public String getUrl(){
        return this.url;
    }
    @Column(name ="urlName",unique=false,nullable=true,insertable=true,updatable=true,length=64)
    public String getUrlName(){
        return this.urlName;
    }
    @Column(name ="icon",unique=false,nullable=true,insertable=true,updatable=true,length=32)
    public String getIcon(){
        return this.icon;
    }
    @Column(name ="pid",unique=false,nullable=true,insertable=true,updatable=true,length=32)
    public String getPid(){
        return this.pid;
    }
    @Column(name ="status",unique=false,nullable=false,insertable=true,updatable=true,length=3)
    public Integer getStatus(){
        return this.status;
    }
    @Column(name ="resource_type",unique=false,nullable=false,insertable=true,updatable=true,length=3)
    public Integer getResourceType(){
        return this.resourceType;
    }
    @Column(name ="create_time",unique=false,nullable=false,insertable=true,updatable=false,length=0)
    public java.util.Date getCreateTime(){
        return this.createTime;
    }
    @Column(name ="sort",unique=false,nullable=true,insertable=true,updatable=true,length=4)
    public Integer getSort() {  return sort;}

    @Transient
    public List<Resource> getResourceList() {
        return resourceList;
    }
    public void setResourceList(List<Resource> resourceList) {
        this.resourceList = resourceList;
    }
}
